/**
 * @ProjectName： naive-admin
 * @FileName： query-breakpoints
 * @Description: // 组合式api文件
 * @Author: ellwood
 * @date: 2024/1/4 - 8:06
 * @Version: V1.0.0
 */

const breakpointsEnum = {
  xl: 1600,
  lg: 1199,
  md: 991,
  sm: 767,
  xs: 575,
}

/**
 * 组合api方法
 */
function useQueryBreakpoints() {
  const breakpoints = reactive(useBreakpoints(breakpointsEnum))

  // 移动端
  const isMobile = breakpoints.smaller('sm')
  // pad断
  const isPad = breakpoints.between('sm', 'md')
  // PC端
  const isDesktop = breakpoints.greater('md')

  return { breakpoints, isMobile, isPad, isDesktop }
}

export { breakpointsEnum, useQueryBreakpoints }
